﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IN=Criteria.Interface;

namespace Criteria.OneCriteria
{
    public class CriteriaFemale : IN.Criteria
    {
        public List<IN.Person> MeetCriteria(List<IN.Person> list)
        {
            List<IN.Person> femaleList = new List<IN.Person>();
            if (list == null || list.Count == 0)
            {
                return femaleList;
            }
            else
            {
                foreach (var item in list)
                {
                    if (item.Gender == "female")
                    {
                        femaleList.Add(item);
                    }
                }
            }
            return femaleList;
        }
    }
}
